<%--
  Created by IntelliJ IDEA.
  User: FJ
  Date: 2019/9/21
  Time: 10:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>TItle</title>

    <link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/layui/css/layui.css" media="all">
</head>
<body>

<div id="content">

</div>

<script src="<%=request.getContextPath()%>/plugins/layui/layui.js" charset="utf-8"></script>
<script src="<%=request.getContextPath()%>/plugins/jquery/jquery.min.js"></script>

<script>
    $(function(){
        $.ajax({
            type:'get',//请求的方式
            url:'/mvc01/foster/ajax.action',
            dataType: "json",
            success:function(result){
                // $("#content").html(obj);
                alert(result.id);
                alert(result.username);
                alert(result.password);
            }
        });
    });
</script>
</body>
</html>